#include<iostream>
#include<queue>

using namespace std;
const int N=1e5+10;
int a[N],b[N];
struct cmz
{
	int sum;//加和
	int i,j;//a和b下标
	bool operator<(const cmz&x)const
	{
		return sum>x.sum;
	}
};
priority_queue<cmz> heap;
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++) cin>>a[i];
	for(int i=0;i<n;i++) cin>>b[i];
	for(int i=0;i<n;i++)
	{
		heap.push({a[i]+b[0],i,0});
	}
	for (int k = 0; k < n; ++k) 
	{

        auto p=heap.top();heap.pop();
		int sum=p.sum,i=p.i,j=p.j;
		cout<<sum<<" ";
		if(j+1<n)
		{
		heap.push({a[i]+b[j+1],i,j+1});
		}
    }
	return 0;
}